class BodySurfaceArea():
    def __init__(self):
        # http://doctor-network.com/public/littletools/6.html
        pass

    def calc(self, data):
        """
        体表面积
        """
        weight = float(data['weight'])  # 血清钙离子
        height = float(data['height'])  # 白蛋白
        if data['gender'] == "1":
            return {"BSA": 0.00607 * height + 0.0127 * weight - 0.0698}
        else:
            return {"BSA": 0.00586 * height + 0.0126 * weight - 0.0461}


if __name__ == '__main__':
    print(BodySurfaceArea().calc({"weight": "75", "height": "176", "gender": "男"}))
